import http from "@/utils/http/index";

//设置知识库有效状态
export function knowledgeBaseSetStatus(data) {
  return http({
    url: `/knowledgeBase/setenabled`,
    method: "post",
    data: data,
  });
}
/**
 * 删除知识库
 *  */
export function knowledgeBaseDelete(data) {
  return http({
    url: `/knowledgeBase/delete?id=${data.id}`,
    method: "post",
    data: data,
  });
}
/**
 * 新增或者更新知识库
 *  */
export function knowledgeBaseAddorupdate(data) {
  return http({
    url: `/knowledgeBase/addorupdate`,
    method: "post",
    data: data,
  });
}
/**
 * 根据问题查询辅助回答答案

 *  */
export function knowledgeBaseAnsewer(data) {
  return http({
    url: `/knowledgeBase/ansewer`,
    method: "get",
    params: data,
  });
}
/**
 * 知识库详情
 *  */
export function knowledgeBaseDdetail(data) {
  return http({
    url: `/knowledgeBase/detail`,
    method: "get",
    params: data,
  });
}

/**
 * 热门知识库列表
 *  */
export function knowledgeBaseHotTableData(data) {
  return http({
    url: `/knowledgeBase/hot/${data.page}/${data.limit}`,
    method: "get",
    params: data,
  });
}

/**
 * 知识库列表
 *  */
export function knowledgeBaseTableData(data) {
  return http({
    url: `/knowledgeBase/list/${data.page}/${data.limit}`,
    method: "get",
    params: data,
  });
}

/**
 * 知识库搜索
 *  */
export function knowledgeBaseSearch(data) {
  return http({
    url: `/knowledgeBase/search`,
    method: "get",
    params: data,
  });
}
/**
 * 未识别问题

 *  */
export function knowledgeBaseUnidentified(data) {
  return http({
    url: `/knowledgeBase/unidentified/${data.page}/${data.limit}`,
    method: "get",
    params: data,
  });
}
/**
 * 新增知识库分类
 *  */
export function addknowledgeBaseClassification(data) {
  return http({
    url: `/knowledgeBaseClassification/addClassification`,
    method: "post",
    data: data,
  });
}
/**
 * 获取热门分类列表
 *  */
export function knowledgeBaseClassificationHotList(data) {
  return http({
    url: `/knowledgeBaseClassification/hot`,
    method: "get",
    params: data,
  });
}
/**
 * 获取分类列表
 *  */
export function knowledgeBaseClassificationList(data) {
  return http({
    url: `/knowledgeBaseClassification/list`,
    method: "get",
    params: data,
  });
}
/**
 * 更新知识库分类
 *  */
export function updateKnowledgeBaseClassification(data) {
  return http({
    url: `/knowledgeBaseClassification/update`,
    method: "post",
    data: data,
  });
}
